package com.tis.database.entitys.promis;

import java.io.Serializable;

import javax.persistence.*;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.tis.database.dao.ClsInstance;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the CUSTOMER_ADDRESSES database table.
 * 
 */
@Entity
@Table(name=ClsInstance.PROMIS_SCHEMA + ClsInstance.POINTER + "CUSTOMER_ADDRESSES")
@NamedQueries({
	@NamedQuery(name= CustomerAddress.findAll , query="FROM CustomerAddress c "),
	@NamedQuery(name=CustomerAddress.findBySearch, query = "FROM CustomerAddress c WHERE 1 = 1 "),
	@NamedQuery(name=CustomerAddress.findByCustomerCode, query = "FROM CustomerAddress c WHERE c.id.customerCode = :customerCode "),
	@NamedQuery(name=CustomerAddress.findById, query = "FROM CustomerAddress c WHERE c.id = :id ")
})
public class CustomerAddress implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Transient public static final String findAll = "CustomerAddress_findAll";
	@Transient public static final String findBySearch = "CustomerAddress_findBySearch";	
	@Transient public static final String findByCustomerCode = "CustomerAddress_findByCustomerCode";
	@Transient public static final String findById = "CustomerAddress_findById";

	@EmbeddedId
	private CustomerAddressPK id;

	@Override
	public String toString()
	{
		return ToStringBuilder.reflectionToString(this);
	}
	
	@Column(name="ADDR_FLAG")
	private String addrFlag;

	@Column(name="ADDR_TYPE")
	private String addrType;

	private String address;

	private String address2;

	private String address3;

	private String address4;

	private String address5;

	@Column(name="ALTERNATE_ADDRESS")
	private String alternateAddress;

	private String amphur;

	@Column(name="AMPHUR_CODE")
	private String amphurCode;

	@Column(name="AR_GL_CODE")
	private String arGlCode;

	@Column(name="AR_SUB_GL_CODE")
	private String arSubGlCode;

	private String city;

	private String company;

	@Column(name="CONTACT_ADDRESS_FROM")
	private String contactAddressFrom;

	@Column(name="CONTACT_PERSON")
	private String contactPerson;

	@Column(name="COUNTRY_CODE")
	private String countryCode;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CURRENT_BALANCE_AMOUNT")
	private BigDecimal currentBalanceAmount;

	@Column(name="CURRENT_BALANCE_FC")
	private BigDecimal currentBalanceFc;

	@Column(name="CUSTOMER_GROUP")
	private String customerGroup;

	@Column(name="CUSTOMER_NAME_IN_ENGLISH")
	private String customerNameInEnglish;

	@Column(name="CUSTOMER_NAME_IN_THAI")
	private String customerNameInThai;

	@Column(name="DEFAULT_FLAG")
	private String defaultFlag;

	private String email;

	@Column(name="FAX_NUMBERS")
	private String faxNumbers;

	@Column(name="\"LANGUAGE\"")
	private String language;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="MOBILE_PHONE_NUMBERS")
	private String mobilePhoneNumbers;

	@Column(name="PHONE_NUMBERS")
	private String phoneNumbers;

	@Column(name="POSTAL_CODE")
	private String postalCode;

	private String province;

	@Column(name="PROVINCE_CODE")
	private String provinceCode;

	@Column(name="REGION_CODE")
	private String regionCode;

	private String remarks;

	@Column(name="ROAD_CODE")
	private String roadCode;

	@Column(name="ROAD_DESC")
	private String roadDesc;

	@Column(name="ROAD_FLAG")
	private String roadFlag;

	private BigDecimal seq;

	private String status;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY")
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO")
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC")
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	private String tambon;

	@Column(name="TAX_ID")
	private BigDecimal taxId;

	@Column(name="TENANT_TYPE")
	private String tenantType;

	@Column(name="TUMBON_CODE")
	private String tumbonCode;

	@Column(name="YEAR_OPENING_BALANCE_AMOUNT")
	private BigDecimal yearOpeningBalanceAmount;

	@Column(name="YEAR_OPENING_BALANCE_FC")
	private BigDecimal yearOpeningBalanceFc;

	public CustomerAddress() {
	}

	public CustomerAddressPK getId() {
		return this.id;
	}

	public void setId(CustomerAddressPK id) {
		this.id = id;
	}

	public String getAddrFlag() {
		return this.addrFlag;
	}

	public void setAddrFlag(String addrFlag) {
		this.addrFlag = addrFlag;
	}

	public String getAddrType() {
		return this.addrType;
	}

	public void setAddrType(String addrType) {
		this.addrType = addrType;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress2() {
		return this.address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getAddress3() {
		return this.address3;
	}

	public void setAddress3(String address3) {
		this.address3 = address3;
	}

	public String getAddress4() {
		return this.address4;
	}

	public void setAddress4(String address4) {
		this.address4 = address4;
	}

	public String getAddress5() {
		return this.address5;
	}

	public void setAddress5(String address5) {
		this.address5 = address5;
	}

	public String getAlternateAddress() {
		return this.alternateAddress;
	}

	public void setAlternateAddress(String alternateAddress) {
		this.alternateAddress = alternateAddress;
	}

	public String getAmphur() {
		return this.amphur;
	}

	public void setAmphur(String amphur) {
		this.amphur = amphur;
	}

	public String getAmphurCode() {
		return this.amphurCode;
	}

	public void setAmphurCode(String amphurCode) {
		this.amphurCode = amphurCode;
	}

	public String getArGlCode() {
		return this.arGlCode;
	}

	public void setArGlCode(String arGlCode) {
		this.arGlCode = arGlCode;
	}

	public String getArSubGlCode() {
		return this.arSubGlCode;
	}

	public void setArSubGlCode(String arSubGlCode) {
		this.arSubGlCode = arSubGlCode;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getContactAddressFrom() {
		return this.contactAddressFrom;
	}

	public void setContactAddressFrom(String contactAddressFrom) {
		this.contactAddressFrom = contactAddressFrom;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getCountryCode() {
		return this.countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getCurrentBalanceAmount() {
		return this.currentBalanceAmount;
	}

	public void setCurrentBalanceAmount(BigDecimal currentBalanceAmount) {
		this.currentBalanceAmount = currentBalanceAmount;
	}

	public BigDecimal getCurrentBalanceFc() {
		return this.currentBalanceFc;
	}

	public void setCurrentBalanceFc(BigDecimal currentBalanceFc) {
		this.currentBalanceFc = currentBalanceFc;
	}

	public String getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(String customerGroup) {
		this.customerGroup = customerGroup;
	}

	public String getCustomerNameInEnglish() {
		return this.customerNameInEnglish;
	}

	public void setCustomerNameInEnglish(String customerNameInEnglish) {
		this.customerNameInEnglish = customerNameInEnglish;
	}

	public String getCustomerNameInThai() {
		return this.customerNameInThai;
	}

	public void setCustomerNameInThai(String customerNameInThai) {
		this.customerNameInThai = customerNameInThai;
	}

	public String getDefaultFlag() {
		return this.defaultFlag;
	}

	public void setDefaultFlag(String defaultFlag) {
		this.defaultFlag = defaultFlag;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFaxNumbers() {
		return this.faxNumbers;
	}

	public void setFaxNumbers(String faxNumbers) {
		this.faxNumbers = faxNumbers;
	}

	public String getLanguage() {
		return this.language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getMobilePhoneNumbers() {
		return this.mobilePhoneNumbers;
	}

	public void setMobilePhoneNumbers(String mobilePhoneNumbers) {
		this.mobilePhoneNumbers = mobilePhoneNumbers;
	}

	public String getPhoneNumbers() {
		return this.phoneNumbers;
	}

	public void setPhoneNumbers(String phoneNumbers) {
		this.phoneNumbers = phoneNumbers;
	}

	public String getPostalCode() {
		return this.postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getProvince() {
		return this.province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getProvinceCode() {
		return this.provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getRegionCode() {
		return this.regionCode;
	}

	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getRoadCode() {
		return this.roadCode;
	}

	public void setRoadCode(String roadCode) {
		this.roadCode = roadCode;
	}

	public String getRoadDesc() {
		return this.roadDesc;
	}

	public void setRoadDesc(String roadDesc) {
		this.roadDesc = roadDesc;
	}

	public String getRoadFlag() {
		return this.roadFlag;
	}

	public void setRoadFlag(String roadFlag) {
		this.roadFlag = roadFlag;
	}

	public BigDecimal getSeq() {
		return this.seq;
	}

	public void setSeq(BigDecimal seq) {
		this.seq = seq;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTambon() {
		return this.tambon;
	}

	public void setTambon(String tambon) {
		this.tambon = tambon;
	}

	public BigDecimal getTaxId() {
		return this.taxId;
	}

	public void setTaxId(BigDecimal taxId) {
		this.taxId = taxId;
	}

	public String getTenantType() {
		return this.tenantType;
	}

	public void setTenantType(String tenantType) {
		this.tenantType = tenantType;
	}

	public String getTumbonCode() {
		return this.tumbonCode;
	}

	public void setTumbonCode(String tumbonCode) {
		this.tumbonCode = tumbonCode;
	}

	public BigDecimal getYearOpeningBalanceAmount() {
		return this.yearOpeningBalanceAmount;
	}

	public void setYearOpeningBalanceAmount(BigDecimal yearOpeningBalanceAmount) {
		this.yearOpeningBalanceAmount = yearOpeningBalanceAmount;
	}

	public BigDecimal getYearOpeningBalanceFc() {
		return this.yearOpeningBalanceFc;
	}

	public void setYearOpeningBalanceFc(BigDecimal yearOpeningBalanceFc) {
		this.yearOpeningBalanceFc = yearOpeningBalanceFc;
	}

	/**
	 * 
	 * Date =Oct 4, 2013 : 11:54:39 AM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 * @param id
	 * @param addrFlag
	 * @param addrType
	 * @param address
	 * @param address2
	 * @param address3
	 * @param address4
	 * @param address5
	 * @param alternateAddress
	 * @param amphur
	 * @param amphurCode
	 * @param arGlCode
	 * @param arSubGlCode
	 * @param city
	 * @param company
	 * @param contactAddressFrom
	 * @param contactPerson
	 * @param countryCode
	 * @param createdBy
	 * @param createdOn
	 * @param currentBalanceAmount
	 * @param currentBalanceFc
	 * @param customerGroup
	 * @param customerNameInEnglish
	 * @param customerNameInThai
	 * @param defaultFlag
	 * @param email
	 * @param faxNumbers
	 * @param language
	 * @param lastUpdBy
	 * @param lastUpdOn
	 * @param mobilePhoneNumbers
	 * @param phoneNumbers
	 * @param postalCode
	 * @param province
	 * @param provinceCode
	 * @param regionCode
	 * @param remarks
	 * @param roadCode
	 * @param roadDesc
	 * @param roadFlag
	 * @param seq
	 * @param status
	 * @param syncCreatedby
	 * @param syncCreatedon
	 * @param syncExternalRefKey
	 * @param syncExternalRefNo
	 * @param syncIsstaging
	 * @param syncIssync
	 * @param syncUpdatedby
	 * @param syncUpdatedon
	 * @param tambon
	 * @param taxId
	 * @param tenantType
	 * @param tumbonCode
	 * @param yearOpeningBalanceAmount
	 * @param yearOpeningBalanceFc
	 */
	public CustomerAddress(CustomerAddressPK id, String addrFlag,
			String addrType, String address, String address2, String address3,
			String address4, String address5, String alternateAddress,
			String amphur, String amphurCode, String arGlCode,
			String arSubGlCode, String city, String company,
			String contactAddressFrom, String contactPerson,
			String countryCode, String createdBy, Date createdOn,
			BigDecimal currentBalanceAmount, BigDecimal currentBalanceFc,
			String customerGroup, String customerNameInEnglish,
			String customerNameInThai, String defaultFlag, String email,
			String faxNumbers, String language, String lastUpdBy,
			Date lastUpdOn, String mobilePhoneNumbers, String phoneNumbers,
			String postalCode, String province, String provinceCode,
			String regionCode, String remarks, String roadCode,
			String roadDesc, String roadFlag, BigDecimal seq, String status,
			String syncCreatedby, Date syncCreatedon,
			String syncExternalRefKey, String syncExternalRefNo,
			String syncIsstaging, String syncIssync, String syncUpdatedby,
			Date syncUpdatedon, String tambon, BigDecimal taxId,
			String tenantType, String tumbonCode,
			BigDecimal yearOpeningBalanceAmount, BigDecimal yearOpeningBalanceFc) {
		super();
		this.id = id;
		this.addrFlag = addrFlag;
		this.addrType = addrType;
		this.address = address;
		this.address2 = address2;
		this.address3 = address3;
		this.address4 = address4;
		this.address5 = address5;
		this.alternateAddress = alternateAddress;
		this.amphur = amphur;
		this.amphurCode = amphurCode;
		this.arGlCode = arGlCode;
		this.arSubGlCode = arSubGlCode;
		this.city = city;
		this.company = company;
		this.contactAddressFrom = contactAddressFrom;
		this.contactPerson = contactPerson;
		this.countryCode = countryCode;
		this.createdBy = createdBy;
		this.createdOn = createdOn;
		this.currentBalanceAmount = currentBalanceAmount;
		this.currentBalanceFc = currentBalanceFc;
		this.customerGroup = customerGroup;
		this.customerNameInEnglish = customerNameInEnglish;
		this.customerNameInThai = customerNameInThai;
		this.defaultFlag = defaultFlag;
		this.email = email;
		this.faxNumbers = faxNumbers;
		this.language = language;
		this.lastUpdBy = lastUpdBy;
		this.lastUpdOn = lastUpdOn;
		this.mobilePhoneNumbers = mobilePhoneNumbers;
		this.phoneNumbers = phoneNumbers;
		this.postalCode = postalCode;
		this.province = province;
		this.provinceCode = provinceCode;
		this.regionCode = regionCode;
		this.remarks = remarks;
		this.roadCode = roadCode;
		this.roadDesc = roadDesc;
		this.roadFlag = roadFlag;
		this.seq = seq;
		this.status = status;
		this.syncCreatedby = syncCreatedby;
		this.syncCreatedon = syncCreatedon;
		this.syncExternalRefKey = syncExternalRefKey;
		this.syncExternalRefNo = syncExternalRefNo;
		this.syncIsstaging = syncIsstaging;
		this.syncIssync = syncIssync;
		this.syncUpdatedby = syncUpdatedby;
		this.syncUpdatedon = syncUpdatedon;
		this.tambon = tambon;
		this.taxId = taxId;
		this.tenantType = tenantType;
		this.tumbonCode = tumbonCode;
		this.yearOpeningBalanceAmount = yearOpeningBalanceAmount;
		this.yearOpeningBalanceFc = yearOpeningBalanceFc;
	}

	
}